<template>
  <basic-dialog
    :title="title"
    width="40%"
    okText="确定"
    :visible="visible"
    :show-close="false"
    :handleOpen="handleOpen"
    :handleClose="handleCancel"
    :handleOk="handleConfirm"
  >
    <el-input
      type="textarea"
      :autosize="{ minRows: 20, maxRows: 40}"
      placeholder="请输入企业名称以逗号分隔"
      v-model="textareaValue"
    />
  </basic-dialog>
</template>
<script>
import BasicDialog from '@/components/BasicDialog';
export default {
  components: {
    BasicDialog,
  },
  props: {
    visible: {
      type: Boolean,
      default: false
    },
    title: {
      type: String,
      default: '名称'
    },
    // 表格高度
    content: {
      type: String,
      default: '',
    },
  },
  data () {
    return {
      textareaValue: '',
    }
  },
  methods: {
    // 高级查询
    handleConfirm () {
      this.$emit('getTextareaValue', this.textareaValue);
      this.$emit('update:visible', false);
    },
    // 取消
    handleCancel () {
      this.$emit('update:visible', false);
    },
    handleOpen () {
      this.textareaValue = this.content;
    }
  }
}
</script>
